package asia.yuanding.wechat.web.controller;

import asia.yuanding.wechat.system.exception.BusinessException;
import asia.yuanding.wechat.system.util.R;
import asia.yuanding.wechat.web.entity.ChatGroup;
import asia.yuanding.wechat.web.service.ChatGroupService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @ClassName: GroupController
 * @Author: YuanDing
 * @Date: 2025/7/27 8:45
 * @Description:
 */

@RestController
@RequestMapping("/group")
public class GroupController {

    @Resource
    private ChatGroupService chatGroupService;


    @PostMapping
    public R addGroup(@RequestBody ChatGroup group) throws BusinessException {
        chatGroupService.createGroup(group);
        return R.ok();
    }

}
